package oopday03.Test03;

//圆类Circle
public class Circle {
    private double radius;//存放圆的半径

    public Circle(double r) {
        radius = r;
    }

    public Circle() {
        radius = 0;
    }

    public double getArea() {
        return radius * radius * Math.PI;
    }

    public double getPerimeter() {
        return 2 * radius * Math.PI;
    }

    public void show() {
        System.out.println("圆的半径为：" + radius + "，周长为：" + getPerimeter() + "，面积为：" + getArea());
    }
}
